package com.yanq.liancar.adapter;
/*
 *  @创建者     liyan
 *  @创建时间   2018/9/12  19:26
 *  @描述       ${TODO}
 */


import android.support.annotation.Nullable;
import android.widget.TextView;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.yanq.liancar.R;
import com.yanq.liancar.bean.GetRescueRecordListBean;

import java.util.List;

public class RescueRecordAdapter extends BaseQuickAdapter<GetRescueRecordListBean.DataBean,BaseViewHolder> {
    public RescueRecordAdapter(int layoutResId, @Nullable List<GetRescueRecordListBean.DataBean> data) {
        super(layoutResId, data);
    }

    @Override
    protected void convert(BaseViewHolder helper, GetRescueRecordListBean.DataBean item) {
        helper.setText(R.id.tv_name,item.getRescue_name())
                .setText(R.id.tv_title,item.getRescue_result())
                .setText(R.id.tv_phone,item.getRescue_tel())
                .setText(R.id.tv_time,item.getTime())
        .addOnClickListener(R.id.Tv_go_evaluate);
        TextView Tv_go_evaluate=helper.getView(R.id.Tv_go_evaluate);
        if (item.getStatus()==1){
            Tv_go_evaluate.setText("已评价");
        }else {
            Tv_go_evaluate.setText("去评价>>");
        }
    }
}
